package cn.wolfcode.crm.web.controller;

import cn.wolfcode.crm.query.SystemLogQueryObject;
import cn.wolfcode.crm.service.ISystemLogService;
import cn.wolfcode.crm.util.PageResult;
import org.apache.shiro.authz.annotation.Logical;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by Administrator on 2018/6/15.
 */
@Controller
@RequestMapping("systemlog")
public class SystemLongController {
    @Autowired
    private ISystemLogService systemLogService;
    @RequestMapping("view")
    @RequiresPermissions(value = {"systemlog:view","系统日志"},logical = Logical.OR)
    public String view() {
        return "systemlog/systemlog";
    }

    @ResponseBody
    @RequestMapping("query")
    public PageResult query(SystemLogQueryObject qo) {
        PageResult query = systemLogService.query(qo);
        return query;
    }
}
